//
//  drawerTableViewCell.m
//  NewMyMusicAPP
//
//  Created by 11_wyq on 15/6/25.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "drawerTableViewCell.h"

@implementation drawerTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier andNumber:(NSInteger)number
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubview:number];
    }
    return self;
    
}


-(void)createSubview:(NSInteger)number
{
 
    self.contentView.backgroundColor = [UIColor clearColor];
    

    if (number == 0) {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 130 * WIDTH, 55 * HEIGHT)];
        self.myImageView.image = [UIImage imageNamed:@"left_home_selected@2x.png"];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        
        
        
        UIImageView *myImageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(48 * WIDTH, 24.7 * HEIGHT, WIDTH*55, HEIGHT * 15.5)];
        myImageView2.image = [UIImage imageNamed:@"shouye.png"];
        [_myImageView addSubview:myImageView2];
        [myImageView2 release];
        
        
        
        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(200 * WIDTH, 20 * HEIGHT, 13 * WIDTH, 15 * HEIGHT)];
        image.image = [UIImage imageNamed:@"charge_arrow@2x.png"];
        [self.contentView addSubview:image];
        [image release];
        
        
        
        
    }
    if (number == 1) {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(3 * WIDTH, 0, 133 * WIDTH, 58 * HEIGHT)];
        self.myImageView.image = [UIImage imageNamed:@"left_channel_selected@2x.png"];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        _myImageView.userInteractionEnabled = YES;
        
        UIImageView *myImageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(47.75 * WIDTH,23.48 * HEIGHT, 55.8 * WIDTH, 16.3 * HEIGHT)];
        myImageView2.image = [UIImage imageNamed:@"pindao.png"];
        [_myImageView addSubview:myImageView2];
        [myImageView2 release];
        
        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(200 * WIDTH, 20 * HEIGHT, 13 * WIDTH, 15 * HEIGHT)];
        image.image = [UIImage imageNamed:@"charge_arrow@2x.png"];
        [self.contentView addSubview:image];
        [image release];
    }
        
    if (number == 2) {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(5* WIDTH, 0, 134.8 * WIDTH, 60.1 * HEIGHT)];
        _myImageView.userInteractionEnabled = YES;
        self.myImageView.image = [UIImage imageNamed:@"left_Vlist_selected@2x.png"];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        
        
        
        UIImageView *myImageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(50.5 * WIDTH,23.95 * HEIGHT, 55.5 * WIDTH, 16.1 * HEIGHT)];
        myImageView2.image = [UIImage imageNamed:@"vbang.png"];
        [_myImageView addSubview:myImageView2];
        [myImageView2 release];
        
        
        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(200 * WIDTH, 20 * HEIGHT, 13 * WIDTH, 15 * HEIGHT)];
        image.image = [UIImage imageNamed:@"charge_arrow@2x.png"];
        [self.contentView addSubview:image];
        [image release];
    
    
    
    }
    if (number == 3) {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(25 * WIDTH, 12 * HEIGHT, 30 * WIDTH,  30 * HEIGHT)];
        self.myImageView.image = [UIImage imageNamed:@"circlelist_heart@2x.png"];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        _myImageView.userInteractionEnabled = YES;
        
        UIImageView *myImageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(39.5 * WIDTH, 9 * HEIGHT, 50 * WIDTH, 15 * HEIGHT)];
        myImageView2.image = [UIImage imageNamed:@"shoucang.png"];
        [_myImageView addSubview:myImageView2];
        [myImageView2 release];
        
        UIImageView *myImageView3 = [[UIImageView alloc]initWithFrame:CGRectMake(-0.2 * WIDTH, 0, 50 * WIDTH, 15 * HEIGHT)];
        myImageView3.image = [UIImage imageNamed:@"shoucang.png"];
        //  myImageView2.backgroundColor = [UIColor blackColor];
        [myImageView2 addSubview:myImageView3];
        [myImageView3 release];

        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(200 * WIDTH, 20 * HEIGHT, 13 * WIDTH, 15 * HEIGHT)];
        image.image = [UIImage imageNamed:@"charge_arrow@2x.png"];
        [self.contentView addSubview:image];
        [image release];
    }
    if (number == 4) {
        self.myImageView = [[UIImageView alloc]initWithFrame:CGRectMake(25 * WIDTH, 3 * HEIGHT, 33 * WIDTH, 33 * HEIGHT)];
         _myImageView.userInteractionEnabled = YES;
        self.myImageView.image = [UIImage imageNamed:@"shezhi.png"];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        
        
        UIImageView *myImageView2 = [[UIImageView alloc]initWithFrame:CGRectMake(29.5 * WIDTH, 10 * HEIGHT, 50 * WIDTH, 15 * HEIGHT)];
        myImageView2.image = [UIImage imageNamed:@"shezhi2.png"];
        [_myImageView addSubview:myImageView2];
        [myImageView2 release];
        


        
        UIImageView *image = [[UIImageView alloc]initWithFrame:CGRectMake(200 * WIDTH, 15 * HEIGHT, 13 * WIDTH, 15 * HEIGHT)];
        image.image = [UIImage imageNamed:@"charge_arrow@2x.png"];
        [self.contentView addSubview:image];
        [image release];
    
    
    }


    
}







- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
